All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.util.BufferManager

java.lang.Object
   |
   +----sun.server.util.BufferManager

public class BufferManager
extends Object
Manages a set of buffers, currently 32k each. Also provides an interface to thread-specific buffers, if available.


Constructor Index

 o BufferManager()

Method Index

 o alloc()
Get a byte array
 o free(byte[])
Return a byte array to the pool
 o getThreadSpecificBuffer(int)
Get a thread-specific buffer if one is available.

Constructors

 o BufferManager
 public BufferManager()

Methods

 o alloc
 public static synchronized byte[] alloc()
Get a byte array

 o free
 public static synchronized void free(byte buf[])
Return a byte array to the pool

 o getThreadSpecificBuffer
 public static byte[] getThreadSpecificBuffer(int size)
Get a thread-specific buffer if one is available. If one is not available, default to using new to create one. Any type of thread may call this method.

Parameters:
size - - the minimum size of the buffer returned.
Returns:
- the buffer

All Packages  Class Hierarchy  This Package  Previous  Next  Index